<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>knet: E:/knet-git/knet/knet/rpc_api.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">knet
   &#160;<span id="projectnumber">1.4.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>结构体</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e74998c9a9305a116abc25fcf9a1edb.html">knet-git</a></li><li class="navelem"><a class="el" href="dir_a1c045b39f32066568ae964b52db514f.html">knet</a></li><li class="navelem"><a class="el" href="dir_f76d03789f0b12416cfffea59e2ed47d.html">knet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">rpc_api.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a00056_source.html">config.h</a>&quot;</code><br />
</div>
<p><a href="a00094_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a5d55f838d222f44965d99eac9a0381c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_a5d55f838d222f44965d99eac9a0381c1.html#a5d55f838d222f44965d99eac9a0381c1">krpc_create</a> ()</td></tr>
<tr class="memdesc:a5d55f838d222f44965d99eac9a0381c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">RPC框架提供了一套底层RPC序列化及反序列化的基础，开发者不应该直接调用这些API，应使用代码生成工具 提供的代码框架来进行RPC操作，生成的代码框架屏蔽了所有烦人的细节，使用起来也会比直接调用这些API更 方便.  <a href="a00094_a5d55f838d222f44965d99eac9a0381c1.html#a5d55f838d222f44965d99eac9a0381c1">更多...</a><br /></td></tr>
<tr class="separator:a5d55f838d222f44965d99eac9a0381c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab07c8ccf1abc99b85f455a2f4280ac76"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_ab07c8ccf1abc99b85f455a2f4280ac76.html#ab07c8ccf1abc99b85f455a2f4280ac76">krpc_destroy</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc)</td></tr>
<tr class="memdesc:ab07c8ccf1abc99b85f455a2f4280ac76"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁RPC  <a href="a00094_ab07c8ccf1abc99b85f455a2f4280ac76.html#ab07c8ccf1abc99b85f455a2f4280ac76">更多...</a><br /></td></tr>
<tr class="separator:ab07c8ccf1abc99b85f455a2f4280ac76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa12a9874d2b0308994c3fa651cdbbd61"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_aa12a9874d2b0308994c3fa651cdbbd61.html#aa12a9874d2b0308994c3fa651cdbbd61">krpc_add_cb</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, uint16_t rpcid, <a class="el" href="a00056_a06bb708c1b97445d3a5d0c1b32ad2ab6.html#a06bb708c1b97445d3a5d0c1b32ad2ab6">krpc_cb_t</a> cb)</td></tr>
<tr class="memdesc:aa12a9874d2b0308994c3fa651cdbbd61"><td class="mdescLeft">&#160;</td><td class="mdescRight">注册RPC调用回调函数  <a href="a00094_aa12a9874d2b0308994c3fa651cdbbd61.html#aa12a9874d2b0308994c3fa651cdbbd61">更多...</a><br /></td></tr>
<tr class="separator:aa12a9874d2b0308994c3fa651cdbbd61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76529ccab5c6f0ada79cac791e299ef9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_a76529ccab5c6f0ada79cac791e299ef9.html#a76529ccab5c6f0ada79cac791e299ef9">krpc_del_cb</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, uint16_t rpcid)</td></tr>
<tr class="memdesc:a76529ccab5c6f0ada79cac791e299ef9"><td class="mdescLeft">&#160;</td><td class="mdescRight">删除注册过的RPC调用回调函数  <a href="a00094_a76529ccab5c6f0ada79cac791e299ef9.html#a76529ccab5c6f0ada79cac791e299ef9">更多...</a><br /></td></tr>
<tr class="separator:a76529ccab5c6f0ada79cac791e299ef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7841a0b4c828efcb607a51bbdd9c9ab1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00056_a06bb708c1b97445d3a5d0c1b32ad2ab6.html#a06bb708c1b97445d3a5d0c1b32ad2ab6">krpc_cb_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_a7841a0b4c828efcb607a51bbdd9c9ab1.html#a7841a0b4c828efcb607a51bbdd9c9ab1">krpc_get_cb</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, uint16_t rpcid)</td></tr>
<tr class="memdesc:a7841a0b4c828efcb607a51bbdd9c9ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">取得注册过的RPC调用回调函数  <a href="a00094_a7841a0b4c828efcb607a51bbdd9c9ab1.html#a7841a0b4c828efcb607a51bbdd9c9ab1">更多...</a><br /></td></tr>
<tr class="separator:a7841a0b4c828efcb607a51bbdd9c9ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac583f7d7c3e3ecb9954530e8d0f6f5f1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_ac583f7d7c3e3ecb9954530e8d0f6f5f1.html#ac583f7d7c3e3ecb9954530e8d0f6f5f1">krpc_proc</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, <a class="el" href="a00056_acc208c4c40c875eebbfef88f00fffacf.html#acc208c4c40c875eebbfef88f00fffacf">kstream_t</a> *stream)</td></tr>
<tr class="memdesc:ac583f7d7c3e3ecb9954530e8d0f6f5f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理RPC调用，从数据流反序列化RPC调用，并调用回调函数  <a href="a00094_ac583f7d7c3e3ecb9954530e8d0f6f5f1.html#ac583f7d7c3e3ecb9954530e8d0f6f5f1">更多...</a><br /></td></tr>
<tr class="separator:ac583f7d7c3e3ecb9954530e8d0f6f5f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a063313e66bd9a479b4d0a6295a5e665b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_a063313e66bd9a479b4d0a6295a5e665b.html#a063313e66bd9a479b4d0a6295a5e665b">krpc_call</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, <a class="el" href="a00056_acc208c4c40c875eebbfef88f00fffacf.html#acc208c4c40c875eebbfef88f00fffacf">kstream_t</a> *stream, uint16_t rpcid, <a class="el" href="a00056_a9c07dfc8c3b965f75b09f82fdb1bbb1e.html#a9c07dfc8c3b965f75b09f82fdb1bbb1e">krpc_object_t</a> *o)</td></tr>
<tr class="memdesc:a063313e66bd9a479b4d0a6295a5e665b"><td class="mdescLeft">&#160;</td><td class="mdescRight">发起RPC调用  <a href="a00094_a063313e66bd9a479b4d0a6295a5e665b.html#a063313e66bd9a479b4d0a6295a5e665b">更多...</a><br /></td></tr>
<tr class="separator:a063313e66bd9a479b4d0a6295a5e665b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5317bb571cb4d94bc56b83989c1b10c2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_a5317bb571cb4d94bc56b83989c1b10c2.html#a5317bb571cb4d94bc56b83989c1b10c2">krpc_set_encrypt_cb</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, <a class="el" href="a00056_ae41a67cc07f8dff897ca978e03b1f2d7.html#ae41a67cc07f8dff897ca978e03b1f2d7">krpc_encrypt_t</a> func)</td></tr>
<tr class="memdesc:a5317bb571cb4d94bc56b83989c1b10c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置签名加密回调  <a href="a00094_a5317bb571cb4d94bc56b83989c1b10c2.html#a5317bb571cb4d94bc56b83989c1b10c2">更多...</a><br /></td></tr>
<tr class="separator:a5317bb571cb4d94bc56b83989c1b10c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa75ec66092e77639ca2cf2b5ad04c5db"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00094_aa75ec66092e77639ca2cf2b5ad04c5db.html#aa75ec66092e77639ca2cf2b5ad04c5db">krpc_set_decrypt_cb</a> (<a class="el" href="a00056_a1e414ac6f6de24462ccf81e10f63428d.html#a1e414ac6f6de24462ccf81e10f63428d">krpc_t</a> *rpc, <a class="el" href="a00056_a5cf750f151c90f0589f68fe8c4421f1d.html#a5cf750f151c90f0589f68fe8c4421f1d">krpc_decrypt_t</a> func)</td></tr>
<tr class="memdesc:aa75ec66092e77639ca2cf2b5ad04c5db"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置签名解密回调  <a href="a00094_aa75ec66092e77639ca2cf2b5ad04c5db.html#aa75ec66092e77639ca2cf2b5ad04c5db">更多...</a><br /></td></tr>
<tr class="separator:aa75ec66092e77639ca2cf2b5ad04c5db"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 七月 27日 星期一 14:33:20 , 为 knet使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
